Language model sharing

ABSTRACT

The sharing of language models is disclosed. In one embodiment, a language model service is provided that is shareable among handlers for input devices. The service includes a pre-processing mode of operation, and a correction mode of operation. In the former mode, the language model service is designed to receive a range within a document from a handler for an input device, and in response provide advice regarding text under consideration by the handler to insert within the document at the range, based on the context of the document within the range. In the latter mode, the language model service is designed to supervise correction over a range of text within a document, in which a number of different handlers for a number of different input devices were initially responsible for insertion of the text, such that the service solicits suggestions from the handlers, and based thereon determines text corrections. The corrections can then be made by the handlers, or by the service.

FIELD OF THE INVENTION

This invention relates generally to language models, such as languagemodels used in conjunction with handwriting and voice recognition, aswell as other recognition applications such as East Asian recognitionapplication and other technologies that utilize a statistical languagemodel, and more particularly to the sharing of such language models.

BACKGROUND OF THE INVENTION

A common application today is the entering, editing and manipulation oftext. Application programs that perform such text operation include wordprocessors, text editors, and even spreadsheets and presentationprograms. For example, a word processor allows a user to enter text toprepare documents such as letters, reports, memos, etc.

While the keyboard has historically been the standard input device bywhich text input is performed into these type of application programs,it is currently being augmented and/or replaced by other types of inputdevices. For example, touch-sensitive pads can be “written” on with astylus, such that a handwriting recognition program can be used to inputthe resulting characters into a program. As another example,voice-recognition programs, which work in conjunction with microphonesattached to computers, also are becoming more popular. Especially fornon-English language users, these non-keyboard type devices are popularfor initially inputting text into programs, such that they can then beedited by the same device, or other devices like the keyboard.

Each of these alternative types of text entry typically has associatedwith it a language model, which is used to recognize the speech orhandwriting input, for example, and translate the input to text. Withinthe prior art, each different type of input has its own language model.This is usually necessary, because the particularities associated withrecognizing speech input, for example, are typically different than theparticularities associated with recognizing handwriting input, forexample. However, the models can be complementary. As an example, alanguage model tuned for speech recognition may utilize more contextualinformation to determine what a user intended to be spoken, while alanguage model tuned for handwriting recognition may only recognizehandwriting on a character-by-character basis. The prior art, however,does not provide for sharing of such different language models.

For this and other reasons, therefore, there is a need for the presentinvention.

SUMMARY OF THE INVENTION

This invention relates to the sharing of language models. In oneembodiment, a language model service is provided that is shareable amonghandlers (i.e., drivers, processors, or other computer programs) forinput devices. The service includes a pre-processing mode of operation,and a correction mode of operation. In the former mode, the languagemodel service is designed to receive a range within a document from ahandler for an input device, and in response provide advice regardingtext under consideration by the handler to insert within the document atthe range, based on the context of the document within the range. In thelatter mode, the language model service is designed to supervisecorrection over a range of text within a document, in which a number ofdifferent handlers for a number of different input devices wereinitially responsible for insertion of the text, such that the servicesolicits suggestions from the handlers, and based thereon determinestext corrections. The corrections can then be made by the handlersthemselves, or by the service itself.

Embodiments of the invention provide for advantages not found within theprior art. In the pre-processing mode of operation, for example, ahandwriting recognition handler may solicit advice from the languagemodel service regarding the context in which a particular character oftext is to be inserted into a document, so that the prediction made bythe handler as to the particular character can be better informed, andthus more accurate. In the correction mode of operation, for example, bysupervising corrections over a range of text that was initially insertedinto the document by different input device handlers, the language modelservice can coordinate the corrections, and hence provide for betterinformed and thus more accurate text corrections.

The invention includes computer-implemented methods, machine-readablemedia, computerized systems, and computers of varying scopes. Otheraspects, embodiments and advantages of the invention, beyond thosedescribed here, will become apparent by reading the detailed descriptionand with reference to the drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram of an operating environment in conjunction withwhich embodiments of the invention can be practiced;

FIG. 2 is a diagram of a system for a pre-processing mode of operation,according to an embodiment of the invention;

FIG. 3 is a flowchart of a method for a pre-processing mode ofoperation, according to an embodiment of the invention;

FIG. 4 is a diagram of a system for a correction mode of operation,according to an embodiment of the invention;

FIG. 5 is a diagram of an example sentence of text in which a correctionmode of operation can be utilized to make corrections thereto, accordingto an embodiment of the invention;

FIG. 6 is a flowchart of a method for a correction mode of operation,according to an embodiment of the invention; and,

FIG. 7 is a diagram of a system according to an embodiment of theinvention.

DETAILED DESCRIPTION OF THE INVENTION

In the following detailed description of exemplary embodiments of theinvention, reference is made to the accompanying drawings which form apart hereof, and in which is shown by way of illustration specificexemplary embodiments in which the invention may be practiced. Theseembodiments are described in sufficient detail to enable those skilledin the art to practice the invention, and it is to be understood thatother embodiments may be utilized and that logical, mechanical,electrical and other changes may be made without departing from thespirit or scope of the present invention. The following detaileddescription is, therefore, not to be taken in a limiting sense, and thescope of the present invention is defined only by the appended claims.

Some portions of the detailed descriptions which follow are presented interms of algorithms and symbolic representations of operations on databits within a computer memory. These algorithmic descriptions andrepresentations are the means used by those skilled in the dataprocessing arts to most effectively convey the substance of their workto others skilled in the art. An algorithm is here, and generally,conceived to be a self-consistent sequence of steps leading to a desiredresult. The steps are those requiring physical manipulations of physicalquantities. Usually, though not necessarily, these quantities take theform of electrical or magnetic signals capable of being stored,transferred, combined, compared, and otherwise manipulated.

It has proven convenient at times, principally for reasons of commonusage, to refer to these signals as bits, values, elements, symbols,characters, terms, numbers, or the like. It should be borne in mind,however, that all of these and similar terms are to be associated withthe appropriate physical quantities and are merely convenient labelsapplied to these quantities. Unless specifically stated otherwise asapparent from the following discussions, it is appreciated thatthroughout the present invention, discussions utilizing terms such asprocessing or computing or calculating or determining or displaying orthe like, refer to the action and processes of a computer system, orsimilar electronic computing device, that manipulates and transformsdata represented as physical (electronic) quantities within the computersystem's registers and memories into other data similarly represented asphysical quantities within the computer system memories or registers orother such information storage, transmission or display devices.

Operating Environment

Referring to FIG. 1, a diagram of the hardware and operating environmentin conjunction with which embodiments of the invention may be practicedis shown. The description of FIG. 1 is intended to provide a brief,general description of suitable computer hardware and a suitablecomputing environment in conjunction with which the invention may beimplemented. Although not required, the invention is described in thegeneral context of computer-executable instructions, such as programmodules, being executed by a computer, such as a personal computer.Generally, program modules include routines, programs, objects,components, data structures, etc., that perform particular tasks orimplement particular abstract data types.

Moreover, those skilled in the art will appreciate that the inventionmay be practiced with other computer system configurations, includinghand-held devices, multiprocessor systems, microprocessor-based orprogrammable consumer electronics, network PC's, minicomputers,mainframe computers, and the like. The invention may also be practicedin distributed computing environments where tasks are performed byremote processing devices that are linked through a communicationsnetwork. In a distributed computing environment, program modules may belocated in both local and remote memory storage devices.

The exemplary hardware and operating environment of FIG. 1 forimplementing the invention includes a general purpose computing devicein the form of a computer 20, including a processing unit 21, a systemmemory 22, and a system bus 23 that operatively couples various systemcomponents include the system memory to the processing unit 21. Theremay be only one or there may be more than one processing unit 21, suchthat the processor of computer 20 comprises a single central-processingunit (CPU), or a plurality of processing units, commonly referred to asa parallel processing environment. The computer 20 may be a conventionalcomputer, a distributed computer, or any other type of computer, theinvention is not so limited.

The system bus 23 may be any of several types of bus structuresincluding a memory bus or memory controller, a peripheral bus, and alocal bus using any of a variety of bus architectures. The system memorymay also be referred to as simply the memory, and includes read onlymemory (ROM) 24 and random access memory (RAM) 25. A basic input/outputsystem (BIOS) 26, containing the basic routines that help to transferinformation between elements within the computer 20, such as duringstart-up, is stored in ROM 24. The computer 20 further includes a harddisk drive 27 for reading from and writing to a hard disk, not shown, amagnetic disk drive 28 for reading from or writing to a removablemagnetic disk 29, and an optical disk drive 30 for reading from orwriting to a removable optical disk 31 such as a CD ROM or other opticalmedia.

The hard disk drive 27, magnetic disk drive 28, and optical disk drive30 are connected to the system bus 23 by a hard disk drive interface 32,a magnetic disk drive interface 33, and an optical disk drive interface34, respectively. The drives and their associated computer-readablemedia provide nonvolatile storage of computer-readable instructions,data structures, program modules and other data for the computer 20. Itshould be appreciated by those skilled in the art that any type ofcomputer-readable media which can store data that is accessible by acomputer, such as magnetic cassettes, flash memory cards, digital videodisks, Bernoulli cartridges, random access memories (RAMs), read onlymemories (ROMs), and the like, may be used in the exemplary operatingenvironment.

A number of program modules may be stored on the hard disk, magneticdisk 29, optical disk 31, ROM 24, or RAM 25, including an operatingsystem 35, one or more application programs 36, other program modules37, and program data 38. A user may enter commands and information intothe personal computer 20 through input devices such as a keyboard 40 andpointing device 42. Other input devices (not shown) may include amicrophone, joystick, game pad, satellite dish, scanner, or the like.These and other input devices are often connected to the processing unit21 through a serial port interface 46 that is coupled to the system bus,but may be connected by other interfaces, such as a parallel port, gameport, or a universal serial bus (USB). A monitor 47 or other type ofdisplay device is also connected to the system bus 23 via an interface,such as a video adapter 48. In addition to the monitor, computerstypically include other peripheral output devices (not shown), such asspeakers and printers.

The computer 20 may operate in a networked environment using logicalconnections to one or more remote computers, such as remote computer 49.These logical connections are achieved by a communication device coupledto or a part of the computer 20; the invention is not limited to aparticular type of communications device. The remote computer 49 may beanother computer, a server, a router, a network PC, a client, a peerdevice or other common network node, and typically includes many or allof the elements described above relative to the computer 20, althoughonly a memory storage device 50 has been illustrated in FIG. 1. Thelogical connections depicted in FIG. 1 include a local-area network(LAN) 51 and a wide-area network (WAN) 52. Such networking environmentsare commonplace in office networks, enterprise-wide computer networks,intranets and the Internal, which are all types of networks.

When used in a LAN-networking environment, the computer 20 is connectedto the local network 51 through a network interface or adapter 53, whichis one type of communications device. When used in a WAN-networkingenvironment, the computer 20 typically includes a modem 54, a type ofcommunications device, or any other type of communications device forestablishing communications over the wide area network 52, such as theInternet. The modem 54, which may be internal or external, is connectedto the system bus 23 via the serial port interface 46. In a networkedenvironment, program modules depicted relative to the personal computer20, or portions thereof, may be stored in the remote memory storagedevice. It is appreciated that the network connections shown areexemplary and other means of and communications devices for establishinga communications link between the computers may be used.

Pre-Processing Mode

In this section of the detailed description, a pre-processing mode of alanguage model service, according to an embodiment of the invention, isdescribed. The pre-processing mode is designed to receive a range oftext within a document from a handler for an input device, and inresponse, provide to the handler advice regarding the text underconsideration by the handler to insert within the document at the range.The advice is based on the context of the document within the range.

Referring to FIG. 2, a diagram of a system 200 in which a pre-processingmode of operation is accomplished, according to an embodiment of theinvention, is shown. The system 200 includes a language model service202, a handler 204, a document 206, and an input device 208. The handler204 is a computer program, also referred to as a driver or a processor,for the input device 208, such that it receives the raw data from theinput device 208, and based thereon injects text into the document 206.For example, the input device 208 can be a touch-sensitive pad on whicha user writes using a stylus, such that the handler 204 recognizes thehandwriting as a character of text to be inserted into the document 206.As another example, the input device 208 can be a microphone into whichthe user speaks, such that the handler 204 recognizes the speech as aword of text to be inserted into the document 206.

The handler 204 in one embodiment has a resident, or internal, languagemodel, not shown in FIG. 2, which it utilizes to translate the raw datareceived from the input device 208 to translate into text to inject intothe document 206 at the specified range. Such language models are knownwithin the art. For example, in the context of a handwriting recognitionhandler, the language model can be (but does not have to be) characterbased, where the language model looks at the user input and translatesit into a text character. As another example, in the context of a speechrecognition handler, the language model is typically word based, wherethe language model looks at the user input and translates it into a wordof text. To improve the accuracy of the translation, the handler 204relies on the language model service 202.

The language model service 202 receives a specified range of text withinthe document 206 from the handler 204, and in response provides adviceto the handler 204 regarding proposed text under consideration to inputinto the document 206 at the range. The language model service 202 inone embodiment encompasses a language model, such as known within theart. For example, the language model can be lattice based, where alattice is a type of data structure used within language models. In suchan embodiment, the language model service 202 provides what is known inthe art as a best path through the lattice back to the handler 204 forthe handler 204 to have its own language model consider when determiningon the text to insert into the document 206.

Thus, the language model service 202 in the case of the pre-processingmode of operation of FIG. 2 is subservient to the handler 204, and doesnot actually insert text into the document 206 itself. Rather, thehandler 204 communicates with the language model service 202, to obtain,for example, a best path through the lattice of the language model ofthe service 202, and uses this information in conjunction with its ownlanguage model to determine what text to insert into the document 206,which it performs itself. By relying on the language model service 202,the handler 204 desirably has improved accuracy as to its recognition ofthe input received from the input device 208. For example, in the caseof handwriting recognition, the handler 204 may have a language modelthat is character based, while the service 202 has a language model thatis word based The word-based language model of the service 202 thusprovides additional information as to the character that the handler 204is contemplating inserting into the document 206.

As an example, the handler 204 may be inserting text into the document206 at a range already including the beginning of a word “th”. Based onthe input from the input device 208, the handler 204 may have determinedbased on its own character language model that the best match for theinput is a letter “z”, with 20% probability, and that the second-bestmatch for the input is a letter “r”, with 15% probability. Withoututilizing the language model service 202, therefore, the handler 204 islikely to enter the letter “z” into the document 206 at the specifiedrange, after the letters “th”. However, it is noted that few words inthe English language beginning with the letters “thz”, so this is likelyincorrect.

A further example is described that is word based. The handler 204 mayhave two candidates, “dog” and “dos” that it passes to the languagemodel service 202. The service 202 can access the document 206 anddetermine that the range in question is surrounded by “The <target>chased the cat” where <target> will be either “dog” or “dos”. Thus, theservice 202 can increase the probability that the correct word is “dog”instead of a “dos”.

However, in accordance with embodiments of the invention, the handler204 also requests the language model service 202 to consider the rangeand also come up with the best character to insert next, based on thespecified range. The service 202 examines this range of text within thedocument, which is “th”, and based thereon has a best match “e” with 85%probability, say, and a second best match “r” with 75% probability. Itreturns this information to the handler 204. The handler 204 may thendecide that since its own language model came up with best matches atthe significantly lower probabilities of 20% and 15%, it would yield tothe matches determined by the service 202. However, the handler 204 mayalso then determine, since the best match of the service 202, “e” with85% probability, is not within the best matches provided by its ownlanguage model, while the second-best match of the service 202, “r” with75% probability, is within the best matches provided by its own languagemodel, that the best character to insert into the document 206 is theletter “r”.

That is, the handler 204 has a language model in this example that ischaracter based, and thus does not consider the context of the range ofthe document 206 into which text is to be injected. It may not have anadditional language model that is word based for space, performance, orother considerations. However, by relying on the generic language modelservice 202, it is able to make use of the word-based language model ofthe service 202, to complement its own word-based character model. Thus,the language model service 202 acts to augment and complement the modelof the handler 204 in this embodiment of the invention. As has beennoted, however, the service 202 is subservient to the handler 204—theservice 202 only provides advice as requested by handlers such as thehandler 204, and does not itself insert text into the document 206.

As shown in FIG. 2, in one embodiment of the invention, interaction withthe document 206 is accomplished directly by both the handler 204 andthe language model service 202. However, the invention itself is not solimited. For example, in another embodiment of the invention, each ofthe handler 204 and the language model service 202 interact with thedocument 206 via a common text framework that provides an abstraction ofthe document 206 for interaction with the handler 204 and the service202. Such a common text framework permit applications that own documentssuch as the document 206, referred herein as owning applications, toexpose their documents as abstractions to handlers and services such asthe handler 204 and the service 202. In one embodiment, the service 202can be considered a special type of input device handler, not having anactual input device, but which communicates with the framework as if itwere a handler. A common text framework in conjunction with whichembodiments of the invention can be implemented is particularlydescribed in the cofiled, copending and coassigned patent applicationentitled “Common Text Framework” [attorney docket no. 1018.097US1].

Referring next to FIG. 3, a flowchart of a method 300, according to anembodiment of the invention, is shown. The method 300 can in oneembodiment be computer-implemented. The computer-implemented method isdesirably realized at least in part as one or more programs running on acomputer—that is, as a program executed from a computer-readable mediumsuch as a memory by a processor of a computer. The programs aredesirably storable on a machine-readable medium such as a floppy disk ora CD-ROM, for distribution and installation and execution on anothercomputer. The program or programs can be a part of a computer system ora computer, such as that described in conjunction with FIG. 1 in aprevious section of the detailed description. The invention is not solimited, however.

As demarcated in FIG. 3 by the dotted-line 302, the parts 304, 306 and308 of the method 300 are performed by a language model service, whilethe parts 310 and 312 of the method 300 are performed by an input devicehandler. In 304, the language model service receives, in apre-processing mode of operation, a range within a document from thehandler. In 306, the language model service generates advice regardingthe text under consideration by the handler to insert within thedocument at the range. In one embodiment, this is accomplished as hasbeen described—for example, the service references the range within thedocument 206, and generates a best path through a lattice for thespecified range. In 308, the language model service provides the adviceback to the handler, such as returning the best path back to thehandler.

In 310, the handler then determines the text to insert within thedocument at the range, based on the advice provided by the languagemodel service, as well as on the raw data it received from the inputdevice. As has been described, for instance, the handler may compareprobabilities of the best path received from the language service andthe best path it determined itself as to its own language model'slattice. In 312, the handler then inserts the text it determined in 310into the document at the specified range.

In one embodiment, the method 300 can be implemented in conjunction witha common text framework as has been described. Thus, in 306, thelanguage model service accesses the text within the range of thedocument via the framework, through an abstraction of the document asexposed by an owning application of the document also via the framework.In 312 as well, the handler inserts the text at the range of thedocument via the framework, also through the abstraction of the documentas exposed by the owning application also via the framework. It is notedthat the invention is not so limited to this embodiment, however.

Correction Mode

In this section of the detailed description, a correction mode of alanguage model service, according to an embodiment of the invention, isdescribed. The correction mode is designed to supervise correction overa range of text within a document, in which a number of differenthandlers for a number of different input devices were initiallyresponsible for insertion of the text. The language model servicesolicits suggestions from the different handlers and based thereondetermines text corrections, to be made either by the service itself orby the handlers themselves.

Referring to FIG. 4, a diagram of a system 400 in which a correctionmode of operation is accomplished, according to an embodiment of theinvention, is shown. The system 400 includes a language model service402, a first handler 404 for a first input device 408, a second handler410 for a second input device 412, and a document 406. Each of thehandlers 404 and 410 are a computer program, also referred to as adriver or a processor, for the input devices 408 and 410, respectively,such that they receive raw data from their respective input devices, andbased thereon inject text into the document 206. For example, the firstinput device 408 may be a touch-sensitive pad on which a user writesusing a stylus, such that the handler 404 recognizes the handwriting asa character of text to be inserted into the document 406. As anotherexample, the second input device 412 may be a microphone into which theuser speaks, such that the handler 410 recognizes the speech as a wordof text to be inserted into the document 406.

As described in the previous section of the detailed description, thehandlers 404 and 410 can in one embodiment each have a resident, orinternal, language model, not shown in FIG. 4, that they utilize totranslate the raw data received from their respective input devices totranslate into text to inject into the document 406. Such languagemodels are known within the art. For example, in the context of ahandwriting recognition handler, the language model is typicallycharacter based, where the language model looks at the user input andtranslate it into a text character. As another example, in the contextof a speech recognition handler, the language model is typically wordbased, where the language model looks at the user input and translatesit into a word of text.

The language model service 402 can of FIG. 4 be the same language modelservice 202 of FIG. 2 that was described in the previous section of thedetailed description. However, operation in the correction mode ofoperation is different than the pre-processing mode of operation. In thecorrection mode of operation, the language model service 402 supervisescorrections over a range of text within a document, where the rangeencompasses text initially inserted by different handlers. The service402 solicits suggestions from the different handlers as to whatcorrections should be made, and based on these suggestions, as well asin one embodiment suggestions made by its own language model, determinesthe corrections that should be made. The service 402 in one embodimentmakes these corrections itself, while in another embodiment the service402 pushes the determined corrections back to the appropriate handlers,requesting them to make the corrections.

Thus, the language model service 402 is a “master” language model ascompared to the language models of the handlers 404 and 410. Each of thehandlers 404 and 410 typically only makes decisions as to what a givenrange of text should be based on the raw data its corresponding inputdevice provided, and does not consider, for example, the range of textfor which the other handler is responsible. The language model service402 in the correction mode of operation provides for overseeing thesehandlers, so that the corrections they make are desirably consistentwith those of the other handler. It is noted that the correction mode ofoperation is desirably performed after initial text has been inserted byvarious handlers into a document, such as in conjunction with thepre-processing mode described in the previous section of the detaileddescription Once text has been so inserted into the document, requestfor reconversion of the text can then desirably be handled by thelanguage model service in the correction mode. In one embodiment, thelanguage model service can also provide for a common correction userinterface to govern corrections made by the user, although the inventionis not so limited.

An example sentence of text 500, as shown in the diagram of FIG. 5, isconsidered. The text 500 is the sentence “The DOS ran to the ball.”,where the ranges of text 502 and 504, corresponding to the words “The”and “ran to the ball.”, were inserted by a handwriting recognitionhandler, while the range of text 506, corresponding to the word “DOS”,was inserted by a speech recognition handler. The user has entered acorrection mode, and is requesting that range of text 508, whichencompasses the ranges 502, 504 and 506, be re-converted. In thecorrection mode, the language model service supervises corrections tothe text. Thus, the service first requests advice, such as lattice bestpaths as described in the previous section of the detailed description,for the ranges 502, 504 and 506, from the handwriting recognition andthe speech recognition handlers, where the former handler providesadvice as to the ranges 502 and 504, and the latter handler providesadvice as to the range 506. For sake of this example, it is assumed thatthe handwriting recognition handler provides a best lattice path of“The” for the range 502 with 95% probability, and a best lattice path of“ran to the ball” for the range 504 also with 95% probability. However,the speech recognition handler provides two best lattice paths for therange 506—“DOS” (as in the computer-related acronym for “disk operatingsystem”) with 25% probability, and “dog” with 20% probability.

Having solicited these suggestions (which in one embodiment are thuspaths through lattices of the appropriate handlers), the language modelservice is then able to run the suggestions against its own languagemodel. Doing so may yield that the path “The DOS ran to the ball.” has asignificantly lower probability than the path “The dog ran to theball.”. As a result, the language model service is likely to determinethat the word “DOS” in the range 506 should be changed to the word“dog”, especially since the speech recognition handler had relativelycomparable and low probabilities for the words “DOS” and “dog”. In oneembodiment, the language model service makes this correction to therange 506 itself However, in another embodiment, the language modelservice sends the correction back to the speech recognition handler,since it was originally responsible for inserting the word “DOS” in thedocument.

As described in the previous section of the detailed description,interaction with the document by the handlers and the language modelservice can be either directly accomplished, through a common textframework, etc.; the invention is not so limited. For example, each ofthe handlers and the language model service can in one embodimentinteract with a document via a common text framework that provides anabstraction of the document for interaction with the handlers and theservice. Such a common text framework, as has been described, permitsapplications that own documents, referred to as owning applications, toexpose their documents as abstractions to handlers and services.Furthermore, as has also been described, in one embodiment the languagemodel service acting as a master in the correction mode of operation isconsidered a special type of input device handler, not having an actualinput device, but communicating with the framework as if it were ahandler. A common text framework in conjunction with which embodimentsof the invention can be implemented is described in the cofiled,copending and coassigned patent application entitled “Common TextFramework” [attorney docket no. 1018.098US1].

Referring next to FIG. 6, a flowchart of a method 600, according to anembodiment of the invention, is shown. The method 600 can in oneembodiment be computer-implemented. The computer-implemented method isdesirably realized at least in part as one or more programs running on acomputer—that is, as a program executed from a computer-readable mediumsuch as a memory by a processor of a computer. The programs aredesirably storable on a machine-readable medium such as a floppy disk ora CD-ROM, for distribution and installation and execution on anothercomputer. The program or programs can be a part of a computer system ora computer, such as that described in conjunction with FIG. 1 in aprevious section of the detailed description. The invention is not solimited, however.

In 602, the language model service, in a correction mode of operation,solicits suggestions over a range of text within a document, where anumber of different handlers were initially responsible for insertion ofthe text within the range (i.e., within a number of ranges within thisrange). In 604, the language model service receives the suggestions backfrom the different handlers. In one embodiment, these suggestions arevarious path(s) through language model lattices of the handlers, withvarying degrees of probability of being the actual text intended to beinserted by the user. In 606, the language model service determines anycorrection(s) to be made to the range of text, based on the suggestionssolicited and received from the input device handlers, and also its owninternal, or resident, language model.

Finally, in 608, the corrections are made, where in one embodiment thecorrections are made by the language model itself, whereas in anotherembodiment the corrections are sent back to the appropriate input devicehandlers that were originally responsible for insertion of the textwithin the range. As has been described, in one embodiment, access tothe text of the document, such as the making of corrections thereto, ismade via a common text framework, through an abstraction of the documentas exposed by an owning application via the common text framework,although the invention itself is not so limited.

Pre-Processing and Correction Modes of Operation

In this section of the detailed description, embodiments of theinvention are presented in which a language model service is operativein both the pre-processing and correction modes, as these modes havebeen described in previous sections of the detailed description. Aparticular embodiment is described in which handlers and a languagemodel service interact with documents owned by application programs viaa common text framework. This description is made with reference to thediagram of FIG. 7.

The system 700 of FIG. 7 includes a common text framework 702, thatprovides for interactivity among applications 704 a, 704 b, . . . , 704n, and input device handlers 708 a, 708 b, . . . , 708 n. Each of theapplication programs 704 a, 704 b, . . . , 704 n is a program that has adocument of primarily text. Such programs include, for example, wordprocessors, text editors, as well as spreadsheets, presentationmanagers, etc.; the invention is not so limited. Application programs704 a, 704 b, . . . , 704 n have corresponding documents 706 a, 706 b, .. . , 706 n, and expose their documents to the framework as abstractionsto the framework 702, as opposed to, for example, the internalrepresentation of the documents 706 a, 706 b, . . . , 706 n.

Input device handlers 708 a, 708 b, . . . , 708 n are the handlers, alsoreferred to as processors or drivers, for corresponding input devices710 a, 710 b, . . . , 710 n. Such input devices include, for example,keyboards, touch pads on which text is “written” using a stylus and thenhandwriting-recognized by their corresponding handlers, microphones intowhich words are spoken and then voice-recognized by their correspondinghandlers, etc.; the invention is not so limited. Input device handlers708 a, 708 b, . . . , 708 n access the abstractions of the documents andinsert additional text into the documents via the framework 702. Each ofthe handlers desirably has its own language model, as has beendescribed.

Thus, the framework 702 is a mechanism by which application programs andinput devices, through their handlers, can interact with one another ona common basis. In one embodiment, the framework 702 is the common textframework described in the copending, coassigned and cofiled patentapplication entitled “Common Text Framework” [attorney docket no.1018.097US1]. The invention is not so limited, however. Furthermore, thelanguage model service 712 desirably has a language model, and isshareable among the handlers 708 a, 708 b, . . . , 708 n, and isoperable in pre-processing mode, and a correction mode, as has beendescribed in previous sections of the detailed description. In oneembodiment, the service 712 is a computer program, such as may be storedas instructions on a machine-readable medium, such as a memory, a harddisk drive or other fixed storage, a CD-ROM or other removable storage,etc.; the invention is not so limited.

Conclusion

Although specific embodiments have been illustrated and describedherein, it will be appreciated by those of ordinary skill in the artthat any arrangement which is calculated to achieve the same purpose maybe substituted for the specific embodiments shown. This application isintended to cover any adaptations or variations of the presentinvention. Therefore, it is manifestly intended that this invention belimited only by the claims and equivalents thereof.

1-10. (canceled)
 11. A computer-implemented method comprising: receivingby a language model service in a pre-processing mode of operation arange within a document from a handler for an input device; generatingby the language model service advice regarding text under considerationby the handler to insert within the document at the range; providing bythe language model service the advice to the handler.
 12. The method ofclaim 11, further comprising: determining by the handler the text underconsideration to insert within the document at the range based on theadvice provided by the language model service; and, inserting by thehandler the text under consideration within the document at the range.13. The method of claim 12, wherein inserting by the handler the textunder consideration within the document at the range comprises insertingthe text at the range via a common text framework through an abstractionof the document as exposed by an owning application thereof via thecommon text framework.
 14. The method of claim 11, wherein providing bythe language model service the advice to the handler comprises accessingtext within the range of the document via a common text frameworkthrough an abstraction of the document as exposed by an owningapplication thereof via the common text framework.
 15. The method ofclaim 11, wherein the advice provided by the language model service tothe handler for the input device in the pre-processing mode of operationcomprises a best path through a lattice maintained by the language modelservice. 16-25. (canceled)